(0) Obligation:

Clauses:

preorder(X, Y) :- pdl(X, -(Y, [])).
pdl(nil, Y) :- ','(!, eq(Y, -(X, X))).
pdl(T, -(.(X, Xs), Zs)) :- ','(value(T, X), ','(left(T, L), ','(right(T, R), ','(pdl(L, -(Xs, Ys)), pdl(R, -(Ys, Zs)))))).
left(nil, nil).
left(tree(L, X1, X2), L).
right(nil, nil).
right(tree(X3, X4, R), R).
value(nil, X5).
value(tree(X6, X, X7), X).
eq(X, X).

Query: preorder(g,a)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

pdlA(nil, []).
pdlA(tree(T57, T58, T59), .(T58, T37)) :- pdlB(T57, T37, X37).
pdlA(tree(T57, T58, T59), .(T58, T37)) :- ','(pdlB(T57, T37, T61), pdlA(T59, T61)).
pdlB(nil, T69, T69).
pdlB(tree(T112, T113, T114), .(T113, T92), X121) :- pdlB(T112, T92, X120).
pdlB(tree(T112, T113, T114), .(T113, T92), X121) :- ','(pdlB(T112, T92, T116), pdlB(T114, T116, X121)).
preorderC(T5, T7) :- pdlA(T5, T7).

Query: preorderC(g,a)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
preorderC_in: (b,f)
pdlA_in: (b,f)
pdlB_in: (b,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

preorderC_in_ga(T5, T7) → U7_ga(T5, T7, pdlA_in_ga(T5, T7))
pdlA_in_ga(nil, []) → pdlA_out_ga(nil, [])
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U1_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U1_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, X37)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U2_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_ga(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U3_ga(T57, T58, T59, T37, pdlA_out_ga(T59, T61)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
U7_ga(T5, T7, pdlA_out_ga(T5, T7)) → preorderC_out_ga(T5, T7)

The argument filtering Pi contains the following mapping:
preorderC_in_ga(x1, x2)  =  preorderC_in_ga(x1)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
pdlA_in_ga(x1, x2)  =  pdlA_in_ga(x1)
nil  =  nil
pdlA_out_ga(x1, x2)  =  pdlA_out_ga
tree(x1, x2, x3)  =  tree(x1, x2, x3)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
preorderC_out_ga(x1, x2)  =  preorderC_out_ga

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

preorderC_in_ga(T5, T7) → U7_ga(T5, T7, pdlA_in_ga(T5, T7))
pdlA_in_ga(nil, []) → pdlA_out_ga(nil, [])
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U1_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U1_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, X37)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U2_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_ga(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U3_ga(T57, T58, T59, T37, pdlA_out_ga(T59, T61)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
U7_ga(T5, T7, pdlA_out_ga(T5, T7)) → preorderC_out_ga(T5, T7)

The argument filtering Pi contains the following mapping:
preorderC_in_ga(x1, x2)  =  preorderC_in_ga(x1)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
pdlA_in_ga(x1, x2)  =  pdlA_in_ga(x1)
nil  =  nil
pdlA_out_ga(x1, x2)  =  pdlA_out_ga
tree(x1, x2, x3)  =  tree(x1, x2, x3)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
preorderC_out_ga(x1, x2)  =  preorderC_out_ga

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

PREORDERC_IN_GA(T5, T7) → U7_GA(T5, T7, pdlA_in_ga(T5, T7))
PREORDERC_IN_GA(T5, T7) → PDLA_IN_GA(T5, T7)
PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → U1_GA(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → PDLB_IN_GAA(T57, T37, X37)
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → U4_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → PDLB_IN_GAA(T112, T92, X120)
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → U5_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_GAA(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U5_GAA(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → PDLB_IN_GAA(T114, T116, X121)
PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → U2_GA(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_GA(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_GA(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U2_GA(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → PDLA_IN_GA(T59, T61)

The TRS R consists of the following rules:

preorderC_in_ga(T5, T7) → U7_ga(T5, T7, pdlA_in_ga(T5, T7))
pdlA_in_ga(nil, []) → pdlA_out_ga(nil, [])
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U1_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U1_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, X37)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U2_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_ga(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U3_ga(T57, T58, T59, T37, pdlA_out_ga(T59, T61)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
U7_ga(T5, T7, pdlA_out_ga(T5, T7)) → preorderC_out_ga(T5, T7)

The argument filtering Pi contains the following mapping:
preorderC_in_ga(x1, x2)  =  preorderC_in_ga(x1)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
pdlA_in_ga(x1, x2)  =  pdlA_in_ga(x1)
nil  =  nil
pdlA_out_ga(x1, x2)  =  pdlA_out_ga
tree(x1, x2, x3)  =  tree(x1, x2, x3)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
preorderC_out_ga(x1, x2)  =  preorderC_out_ga
PREORDERC_IN_GA(x1, x2)  =  PREORDERC_IN_GA(x1)
U7_GA(x1, x2, x3)  =  U7_GA(x3)
PDLA_IN_GA(x1, x2)  =  PDLA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
PDLB_IN_GAA(x1, x2, x3)  =  PDLB_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5, x6)  =  U4_GAA(x6)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x3, x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x3, x5)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PREORDERC_IN_GA(T5, T7) → U7_GA(T5, T7, pdlA_in_ga(T5, T7))
PREORDERC_IN_GA(T5, T7) → PDLA_IN_GA(T5, T7)
PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → U1_GA(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → PDLB_IN_GAA(T57, T37, X37)
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → U4_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → PDLB_IN_GAA(T112, T92, X120)
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → U5_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_GAA(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U5_GAA(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → PDLB_IN_GAA(T114, T116, X121)
PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → U2_GA(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_GA(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_GA(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U2_GA(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → PDLA_IN_GA(T59, T61)

The TRS R consists of the following rules:

preorderC_in_ga(T5, T7) → U7_ga(T5, T7, pdlA_in_ga(T5, T7))
pdlA_in_ga(nil, []) → pdlA_out_ga(nil, [])
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U1_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U1_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, X37)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U2_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_ga(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U3_ga(T57, T58, T59, T37, pdlA_out_ga(T59, T61)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
U7_ga(T5, T7, pdlA_out_ga(T5, T7)) → preorderC_out_ga(T5, T7)

The argument filtering Pi contains the following mapping:
preorderC_in_ga(x1, x2)  =  preorderC_in_ga(x1)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
pdlA_in_ga(x1, x2)  =  pdlA_in_ga(x1)
nil  =  nil
pdlA_out_ga(x1, x2)  =  pdlA_out_ga
tree(x1, x2, x3)  =  tree(x1, x2, x3)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
preorderC_out_ga(x1, x2)  =  preorderC_out_ga
PREORDERC_IN_GA(x1, x2)  =  PREORDERC_IN_GA(x1)
U7_GA(x1, x2, x3)  =  U7_GA(x3)
PDLA_IN_GA(x1, x2)  =  PDLA_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
PDLB_IN_GAA(x1, x2, x3)  =  PDLB_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5, x6)  =  U4_GAA(x6)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x3, x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x3, x5)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 7 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → U5_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_GAA(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → PDLB_IN_GAA(T114, T116, X121)
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → PDLB_IN_GAA(T112, T92, X120)

The TRS R consists of the following rules:

preorderC_in_ga(T5, T7) → U7_ga(T5, T7, pdlA_in_ga(T5, T7))
pdlA_in_ga(nil, []) → pdlA_out_ga(nil, [])
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U1_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U1_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, X37)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U2_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_ga(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U3_ga(T57, T58, T59, T37, pdlA_out_ga(T59, T61)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
U7_ga(T5, T7, pdlA_out_ga(T5, T7)) → preorderC_out_ga(T5, T7)

The argument filtering Pi contains the following mapping:
preorderC_in_ga(x1, x2)  =  preorderC_in_ga(x1)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
pdlA_in_ga(x1, x2)  =  pdlA_in_ga(x1)
nil  =  nil
pdlA_out_ga(x1, x2)  =  pdlA_out_ga
tree(x1, x2, x3)  =  tree(x1, x2, x3)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
preorderC_out_ga(x1, x2)  =  preorderC_out_ga
PDLB_IN_GAA(x1, x2, x3)  =  PDLB_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x3, x6)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → U5_GAA(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_GAA(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → PDLB_IN_GAA(T114, T116, X121)
PDLB_IN_GAA(tree(T112, T113, T114), .(T113, T92), X121) → PDLB_IN_GAA(T112, T92, X120)

The TRS R consists of the following rules:

pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)

The argument filtering Pi contains the following mapping:
nil  =  nil
tree(x1, x2, x3)  =  tree(x1, x2, x3)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
PDLB_IN_GAA(x1, x2, x3)  =  PDLB_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x3, x6)

We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PDLB_IN_GAA(tree(T112, T113, T114)) → U5_GAA(T114, pdlB_in_gaa(T112))
U5_GAA(T114, pdlB_out_gaa) → PDLB_IN_GAA(T114)
PDLB_IN_GAA(tree(T112, T113, T114)) → PDLB_IN_GAA(T112)

The TRS R consists of the following rules:

pdlB_in_gaa(nil) → pdlB_out_gaa
pdlB_in_gaa(tree(T112, T113, T114)) → U4_gaa(pdlB_in_gaa(T112))
pdlB_in_gaa(tree(T112, T113, T114)) → U5_gaa(T114, pdlB_in_gaa(T112))
U4_gaa(pdlB_out_gaa) → pdlB_out_gaa
U5_gaa(T114, pdlB_out_gaa) → U6_gaa(pdlB_in_gaa(T114))
U6_gaa(pdlB_out_gaa) → pdlB_out_gaa

The set Q consists of the following terms:

pdlB_in_gaa(x0)
U4_gaa(x0)
U5_gaa(x0, x1)
U6_gaa(x0)

We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • U5_GAA(T114, pdlB_out_gaa) → PDLB_IN_GAA(T114)
    The graph contains the following edges 1 >= 1

  • PDLB_IN_GAA(tree(T112, T113, T114)) → PDLB_IN_GAA(T112)
    The graph contains the following edges 1 > 1

  • PDLB_IN_GAA(tree(T112, T113, T114)) → U5_GAA(T114, pdlB_in_gaa(T112))
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → U2_GA(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_GA(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → PDLA_IN_GA(T59, T61)

The TRS R consists of the following rules:

preorderC_in_ga(T5, T7) → U7_ga(T5, T7, pdlA_in_ga(T5, T7))
pdlA_in_ga(nil, []) → pdlA_out_ga(nil, [])
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U1_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, X37))
pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U1_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, X37)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
pdlA_in_ga(tree(T57, T58, T59), .(T58, T37)) → U2_ga(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_ga(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → U3_ga(T57, T58, T59, T37, pdlA_in_ga(T59, T61))
U3_ga(T57, T58, T59, T37, pdlA_out_ga(T59, T61)) → pdlA_out_ga(tree(T57, T58, T59), .(T58, T37))
U7_ga(T5, T7, pdlA_out_ga(T5, T7)) → preorderC_out_ga(T5, T7)

The argument filtering Pi contains the following mapping:
preorderC_in_ga(x1, x2)  =  preorderC_in_ga(x1)
U7_ga(x1, x2, x3)  =  U7_ga(x3)
pdlA_in_ga(x1, x2)  =  pdlA_in_ga(x1)
nil  =  nil
pdlA_out_ga(x1, x2)  =  pdlA_out_ga
tree(x1, x2, x3)  =  tree(x1, x2, x3)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x3, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
preorderC_out_ga(x1, x2)  =  preorderC_out_ga
PDLA_IN_GA(x1, x2)  =  PDLA_IN_GA(x1)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x3, x5)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PDLA_IN_GA(tree(T57, T58, T59), .(T58, T37)) → U2_GA(T57, T58, T59, T37, pdlB_in_gaa(T57, T37, T61))
U2_GA(T57, T58, T59, T37, pdlB_out_gaa(T57, T37, T61)) → PDLA_IN_GA(T59, T61)

The TRS R consists of the following rules:

pdlB_in_gaa(nil, T69, T69) → pdlB_out_gaa(nil, T69, T69)
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U4_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, X120))
pdlB_in_gaa(tree(T112, T113, T114), .(T113, T92), X121) → U5_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T112, T92, T116))
U4_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, X120)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)
U5_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T112, T92, T116)) → U6_gaa(T112, T113, T114, T92, X121, pdlB_in_gaa(T114, T116, X121))
U6_gaa(T112, T113, T114, T92, X121, pdlB_out_gaa(T114, T116, X121)) → pdlB_out_gaa(tree(T112, T113, T114), .(T113, T92), X121)

The argument filtering Pi contains the following mapping:
nil  =  nil
tree(x1, x2, x3)  =  tree(x1, x2, x3)
pdlB_in_gaa(x1, x2, x3)  =  pdlB_in_gaa(x1)
pdlB_out_gaa(x1, x2, x3)  =  pdlB_out_gaa
U4_gaa(x1, x2, x3, x4, x5, x6)  =  U4_gaa(x6)
U5_gaa(x1, x2, x3, x4, x5, x6)  =  U5_gaa(x3, x6)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
PDLA_IN_GA(x1, x2)  =  PDLA_IN_GA(x1)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x3, x5)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PDLA_IN_GA(tree(T57, T58, T59)) → U2_GA(T59, pdlB_in_gaa(T57))
U2_GA(T59, pdlB_out_gaa) → PDLA_IN_GA(T59)

The TRS R consists of the following rules:

pdlB_in_gaa(nil) → pdlB_out_gaa
pdlB_in_gaa(tree(T112, T113, T114)) → U4_gaa(pdlB_in_gaa(T112))
pdlB_in_gaa(tree(T112, T113, T114)) → U5_gaa(T114, pdlB_in_gaa(T112))
U4_gaa(pdlB_out_gaa) → pdlB_out_gaa
U5_gaa(T114, pdlB_out_gaa) → U6_gaa(pdlB_in_gaa(T114))
U6_gaa(pdlB_out_gaa) → pdlB_out_gaa

The set Q consists of the following terms:

pdlB_in_gaa(x0)
U4_gaa(x0)
U5_gaa(x0, x1)
U6_gaa(x0)

We have to consider all (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • U2_GA(T59, pdlB_out_gaa) → PDLA_IN_GA(T59)
    The graph contains the following edges 1 >= 1

  • PDLA_IN_GA(tree(T57, T58, T59)) → U2_GA(T59, pdlB_in_gaa(T57))
    The graph contains the following edges 1 > 1

(22) YES